package demo;

import java.util.Scanner;

//class Year{
//    int year;
//
//    public Year(int year) {
//        this.year = year;
//    }
//
//    public static void rn(int year){
//        if((year % 4 == 0 && year % 100 !=0) || year % 400 ==0){
//            System.out.println(year + "是闰年");
//        }else{
//            System.out.println(year + "不是闰年");
//        }
//    }
//}
public class LeapYear {
    private static boolean isLeapYear(int year) {
        if (year >= 1582) {
            return (year % 4 == 0 && year % 100 != 0) || (year % 400 == 0);
        } else {
            if (year > 0) {
                return year % 4 == 0;
            } else {
                return (-year) % 4 == 1;
            }
        }
    }
    public static void main(String[] args) {
//        Scanner scanner = new Scanner(System.in);
//        Year y = new Year(scanner.nextInt());
//
//       Year.rn(y.year);
        Scanner scanner = new Scanner(System.in);
        int year = scanner.nextInt();

        System.out.println(year + " is a leap year? " + isLeapYear(year));
    }
}
